unit progress;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  ComCtrls;

type
  TfmProgress = class(TForm)
    PB: TProgressBar;
  private
    { Private declarations }
  public
    { Public declarations }
    procedure Start(Max: integer);
    procedure Step;
  end;

var
  fmProgress: TfmProgress;

implementation

{$R *.DFM}

{ TfmProgress }

procedure TfmProgress.Start(Max: integer);
begin
  PB.Max := Max;
  Show;
  Update;
end;

procedure TfmProgress.Step;
begin
  if not Visible then Show;
  PB.StepIt;
  Application.ProcessMessages;
end;

end.
